#!/bin/bash
set -e -o pipefail

curl https://ftp.gnu.org/gnu/gdb/gdb-7.12.tar.gz | tar xz
cd gdb-7.12

# move to ctftools virtual env
source ctf-tools-venv-activate

./configure --prefix=$(dirname $PWD) --with-python=$(which python) --enable-targets=all
make -j $(nproc)
make install
